Appearance inspection apparatus, surface treatment system, appearance inspection method, program and shot material replacement determination method

ABSTRACT

An appearance inspection apparatus is intended to reduce overdetection of a defect in an appearance inspection. The appearance inspection apparatus in the surface treatment system images an inspection target Wk by an imaging part and includes a replacement determination part which determines that a shot material needs replacement in an ejector when the difference between the brightness level of an inspection target region in a captured image and the brightness level of a reference region in a reference image is a predetermined threshold or more. Thus, the determination of the replacement of the shot material is executed within a range allowing effective reduction of overdetection by the appearance inspection apparatus and thereby the appearance inspection apparatus is capable of reducing overdetection of the defect.

TECHNICAL FIELD

The present invention relates to a technique of inspecting a surface ofan inspection target subjected to surface treatment with a shotmaterial, and a technique of determining the necessity to replace theshot material in an ejector.

BACKGROUND ART

A metallic component used in a driving part of an automobile hasconventionally been manufactured by forging or casting, for example.After manufacture of the metallic component, the resultant metalliccomponent is subjected to what is called an appearance inspectionconducted to determine the presence or absence of a defect such as aflaw. Such an appearance inspection on the metallic component hasconventionally been conducted visually by a worker. However, relying onthe visual inspection by a worker causes nonuniformity in time requiredfor the inspection or inspection result between multiple workers. Evenif the inspection is conducted by one worker, a poor physical conditionor a lapse in concentration of the worker may make the inspection timeconsuming or cause the risk of missing a defect. Hence, an apparatusallowing implementation of an appearance inspection on a metalliccomponent automatically at high speed has been desired to be developed.

In this regard, patent literature 1 suggests an appearance inspectionapparatus that generates a composite inspection image by capturingimages of a metallic component as a target under multiple lightingconditions, and extracts a region with a shape defect at the targetbased on the composite inspection image and a reference image.

CITATION LIST Patent Literature

Patent Literature 1: Japanese Patent Application Publication No.2015-068668

SUMMARY Technical Problem

The foregoing appearance inspection conducted by comparing a referenceimage and a captured image encounters a problem called “overdetection”by which, even in the absence of a defect on a surface of a targetappearing in the captured image, a difference of a certain degree ormore existing between the reference image and the captured image isdetected as a defect. If a substance not considered as a defect (falsedefect) is extracted as a defect by overdetection, the appearanceinspection apparatus determines that a defect is present at a targetwithout a defect. This affects the manufacture yield of the target.Thus, reducing overdetection is required.

The present invention has been made in view of the above-describedproblem. The present invention is intended to reduce overdetection in anappearance inspection apparatus and to conduct an inspection with a highdegree of accuracy.

Solution to Problem

One aspect of the present invention is an appearance inspectionapparatus that inspects a surface of an inspection target subjected tosurface treatment with a shot material. The apparatus includes: animaging part that captures an image of the surface of the inspectiontarget to acquire a captured image; a storage that contains a referenceimage corresponding to the captured image; a defect candidate detectorthat detects a defect candidate region in the captured image based onthe captured image and the reference image; and a replacementdetermination part that determines the necessity to replace the shotmaterial based on the brightness level of an inspection target region inthe captured image and the brightness level of a reference region in thereference image corresponding to the inspection target region.

Another aspect of the present invention is an appearance inspectionmethod of inspecting a surface of an inspection target subjected tosurface treatment with a shot material. The method includes: apreparation step of preparing a captured image by capturing an image ofthe surface of the inspection target and a reference image correspondingto the captured image; a defect candidate detection step of detecting adefect candidate region in the captured image based on the capturedimage and the reference image; and a replacement determination step ofdetermining the necessity to replace the shot material based on thebrightness level of an inspection target region in the captured imageand the brightness level of a reference region in the reference imagecorresponding to the inspection target region.

Advantageous Effects of Invention

The present invention is capable of reducing overdetection by theappearance inspection apparatus.

The above and further objects and novel features of the invention willmore fully appear from the following detailed description when the sameis read in connection with the accompanying drawing. It is to beexpressly understood, however, that the drawing is for purpose ofillustration only and is not intended as a definition of the limits ofthe invention.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a drawing showing the configuration of a surface treatmentsystem.

FIG. 2 is a drawing showing the configuration of the controller.

FIG. 3 is a block diagram showing functions and configuration realizedby the controller.

FIG. 4 is a flow chart showing operations of the surface treatmentsystem.

FIG. 5 is a flow chart showing the image preparation step in FIG. 4 indetail.

FIG. 6 is a drawing schematically showing a captured image acquired bythe imaging part.

FIG. 7 is a drawing schematically showing a reference image acquired bythe imaging part.

FIG. 8 is graph showing a relationship between the overdetection ratioand a difference in brightness level between the replacement inspectiontarget region and the replacement reference region.

DESCRIPTION OF EMBODIMENTS

FIG. 1 is a drawing showing the configuration of a surface treatmentsystem 1 according to an embodiment of the present invention. Thesurface treatment system 1 includes an ejector 2 and an appearanceinspection apparatus 3. The ejector 2 is to treat a surface of athree-dimensional treatment target Wk with a shot material. Theappearance inspection apparatus 3 is to inspect the appearance of aninspection target Wk having a surface not mirror finished but is givenasperities through the surface treatment by the ejector 2. Specifically,the treatment target Wk to be treated by the ejector 2 is also theinspection target Wk to be inspected by the appearance inspectionapparatus 3.

<Inspection Target>

The inspection target Wk is a metallic component formed by forging orcasting, for example. The inspection target Wk has a surface in a mattestate with tiny asperities, specifically, in a frosted state. In otherwords, the surface of the inspection target Wk has a gloss while causingirregular reflection of light. The glossiness of the surface of theinspection target Wk is preferably from about 20 to about 60. Theglossiness is an index representing a degree of a gloss at a surface ofan object one-dimensionally determined by giving attention to a ratio ofregularly reflected light or a directional distribution of diffuselyreflected light, etc. The glossiness is measured using a glossmeterconforming to a glossiness measurement method defined under industrialstandards such as JIS.

The surface of the inspection target Wk is treated through shot blastingusing a certain shot material by the ejector 2 such as sandblasting orsteel shot blasting, for example. The surface of the inspection targetWk has a shape from which a boundary between an upper surface or a lowersurface and a side surface, a corner at an edge, or a burr caused duringshape formation has been removed (this shape is what is called an Rshape). A burr may be removed by shot blasting, or by post treatmentperformed after the shot blasting. The inspection target Wk is, forexample, any type of components used for universal joints such as ametallic component to be used in a driving part for driving a vehicle,an airplane, or a power generator, for example.

A defect at the surface of the inspection target Wk is a recessed orprojecting site, compared to an ideal shape. The defect may be a dent, ascratch, or a machining failure, for example. The defect may also be aforeign matter adhering to the surface.

<Configuration of Ejector 2>

The configuration of the ejector 2 will be described by referring toFIG. 1. The ejector 2 is to treat the surface of the inspection targetWk with a shot material. The ejector 2 includes a chamber 20, anejection part 21, a shot material supplier 22, a shot material collector23, a shot material storage 24, and a supply controller 25.

The chamber 20 houses the inspection target Wk carried into the chamber20 through a gate not shown in the drawings for letting the inspectiontarget Wk in and out. A holder 201 is provided inside the chamber 20.The inspection target Wk carried in is held by the holder 201.

The ejection part 21 ejects a shot material 211 to the inspection targetWk housed in the chamber 20 and held by the holder 201 whileaccelerating the shot material 211. The ejection part 21 is an impellerthat makes the shot material 211 collide with a rotating vane, andaccelerates and pushes out the shot material 211 using centrifugal forceresulting from the rotation. The ejection part 21 is not limited to theforegoing in terms of embodying the present invention. The ejection part21 may be a nozzle for accelerating and ejecting the shot material 211using compressed air.

Metallic beads are used as the shot material 211. A material for theshot material 211 is selected appropriately in consideration of thehardness of the inspection target Wk or a degree of surface treatment onthe inspection target Wk. For example, the material may be steel balls,stainless steel balls, or aluminum balls. The shot material 211 isejected by the ejection part 21 and is caused to collide with theinspection target Wk. By doing so, the shot material 211 is used forpolishing the surface or removing a burr from the surface of theinspection target Wk. The shot material 211 is not limited to metallicbeams but may also be glass beads or resin-based beads, for example.

The shot material supplier 22 supplies the ejection part 21 with theshot material 211. The shot material supplier 22 is connected to theejection part 21 by a pipe 221. The shot material supplier 22 containsthe shot material 211 primarily, and feeds the stored shot material 211sequentially to the ejection part 21 through the pipe 221.

The shot material collector 23 collects the shot material 211 existingat a lower part of the chamber 20 after being ejected from the ejectionpart 21, and carries the collected shot material 211 to the shotmaterial supplier 22. The shot material collector 23 may be providedwith a screening mechanism such as a filter for discriminating betweenthe collected shot material 211 and burr dust derived from theinspection target Wk. The shot material collector 23 is connected to adischarge mechanism not shown in the drawings for discharging thecollected shot material 211 to the outside without carrying thecollected shot material 211 to the shot material supplier 22. In thisway, the shot material 211 is discharged to the outside, whereappropriate.

The shot material storage 24 primarily contains a new shot material 211carried in from the outside, and supplies the shot material supplier 22with the shot material 211. The shot material storage 24 is connected tothe shot material supplier 22 by a pipe 27. The pipe 27 includes anon-off valve 26. For example, the shot material storage 24 is ahorn-shaped or bell-shaped hopper with an open top and a shrinkingbottom. The pipe 27 is located below the shot material storage 24 andconnected to the shot material storage 24. When the on-off valve 26 isopened, the shot material 211 in the shot material storage 24 issupplied through the pipe 27 to the shot material supplier 22 with theforce of gravity. When the on-off valve 26 is closed, the shot material211 is not supplied from the shot material storage 24 to the shotmaterial supplier 22.

The supply controller 25 is configured using a computer. The supplycontroller 25 is electrically connected to the on-off valve 26 tocontrol opening and closing of the on-off valve 26. The on-off valve 26is in a normally-closed state. In response to input of a shot materialreplacement signal Sig1 described later to the supply controller 25, thesupply controller 25 issues an operation command for the on-off valve 26to open the on-off valve 26. By doing so, supply of the shot material211 from the shot material storage 24 to the shot material supplier 22is started. Input of the shot material replacement signal Sig1 is notthe only timing of issuing the operation command for the on-off valve 26but the timing may be determined freely.

<Configuration of Appearance Inspection Apparatus 3>

After the ejector 2 performs surface treatment on the inspection targetWk, the inspection target Wk is carried to the appearance inspectionapparatus 3 as shown by an arrow AR1 in FIG. 1. Then, the appearanceinspection apparatus 3 inspects the surface of the inspection target Wk.The inspection target Wk may be carried from the ejector 2 to theappearance inspection apparatus 3 by a carrier such as a belt conveyoror a robot arm. Alternatively, the inspection target Wk placed on apallet may be carried by an operator. The ejector 2 and the appearanceinspection apparatus 3 are not required to be arranged adjacent to eachother but may be arranged at separate places. For example, the ejector 2and the appearance inspection apparatus 3 may be located at differentbuildings.

The appearance inspection apparatus 3 includes a body 30 and acontroller 4. The body 30 includes an imaging part 31, a light emitter32, 33 and a holder 34. The inspection target Wk carried in through agate not shown in the drawings for letting the inspection target Wk inand out is held by the holder 34. The body 30 is provided with alight-shielding cover not shown in the drawings for preventing arrivalof external light on the holder 34. The imaging part 31, the lightemitters 32 and 33, and the holder 34 are arranged in thelight-shielding cover. The controller 4 includes a computer systemdescribed later (see FIG. 2) with a display part 41 configured using adisplay, and an input part 42 configured using a mouse and a keyboard.

Another body 30 is provided when the entire surface of the inspectiontarget Wk is inspected automatically. A reversing mechanism is providedbetween the two bodies 30 for carrying the inspection target Wk whileturning the inspection target Wk upside down.

As shown in FIG. 1, the imaging part 31 is supported by a support notshown in the drawings to be located above the holder 34. The imagingpart 31 is usable for acquiring an image of the inspection target Wk onthe holder 34 captured directly from above the inspection target Wk. Theimaging part 31 includes a two-dimensional image sensor such as a CCD(charge coupled device) or a CMOS (complementary metal-oxidesemiconductor) image sensor to acquire an image of multiple tones.

The arrangement of the imaging part 31 is not limited to the foregoingin terms of embodying the present invention. For example, the imagingpart 31 may be arranged at a position tilted at a given angle from aposition directly above the holder 34, and may be configured to acquirean image of the inspection target Wk on the holder 34 captured fromdiagonally above the inspection target Wk.

Each of the light emitters 32 and 33 is supported by a support not shownin the drawings to be arranged diagonally above the holder 34. The lightemitter 33 is arranged at a position on the opposite side of the lightemitter 32 across the imaging part 31, for example, at a positionsymmetric with the light emitter 32. Each of the light emitter 32 andthe light emitter 33 is configured using a bar luminaire with an arrayof multiple light-emitting diodes (LEDs), and is capable of emittinglight to the inspection target Wk on the holder 34 from diagonally abovethe inspection target Wk.

In the below, a state in which light is emitted from one of the lightemitter 32, 33 and the inspection target Wk is illuminated with theone-sided light will be called an “individually illuminated state.” Astate in which beams of light are emitted from both the light emitter32, 33 and the inspection target Wk is illuminated with the beams oflight coming from multiple directions will be called a “multipliedilluminated state.” The individually illuminated state and themultiplied illuminated state will collectively called an “illuminatedstate” simply.

FIG. 2 shows the configuration of the controller 4. The controller 4 isa computer and has the configuration of a general computer systemincluding a CPU 121, a ROM 122, and a RAM 123. The CPU 121 performsvarious types of calculation. The ROM 122 contains a basic program. TheRAM 123 contains various types of information. The controller 4 furtherincludes a fixed disk 124, the display part 41, the input part 42, areader device 127, and a communication part 128. The fixed disk 124contains information. The display part 41 includes a display on whichvarious types of information including an image are presented. The inputpart 42 includes a keyboard and a mouse for accepting an input from anoperator. The reader device 127 reads information from acomputer-readable recording medium 8 such as an optical disk, a magneticdisk, or a magneto-optical disk. The communication part 128 transmitsand receives signals to and from the structures of the appearanceinspection apparatus 3 other than the communication part 128, and to andfrom the ejector 2. The display part 41 and the input part 42 may beconfigured integrally using a touch panel.

In the controller 4, a program 80 is read in advance from the recordingmedium 8 through the reader device 127, and stored into the fixed disk124. The CPU 121 performs calculation by following the program 80 andusing the RAM 123 or the fixed disk 124. The CPU 121 functions as acalculation part in the controller 4. A different structure other thanthe CPU 121 and functioning as a calculation part may be provided.

FIG. 3 shows functions realized by implementation of calculation by thecontroller 4 by following the program 80. An imaging controller 401, astorage 402, a defect candidate detector 403, a replacementdetermination part 404, and a threshold determination part 405 shown inFIG. 3 correspond to the functions realized by the controller 4. All orsome of these functions may be realized by a dedicated electric circuit.Alternatively, these functions may be realized using multiple computers.

The imaging controller 401 controls the imaging part 31 and the lightemitters 32, 33 to acquire an image of the inspection target Wk (in anexact sense, data indicating the image). The image data is stored intothe storage 402.

As will be described later, each time the imaging controller 401controls the light emitters 32, 33 to change an illuminated state, theimaging part 31 acquires image data. In the below, an image acquiredthrough imaging by the imaging part 31 will be called a “capturedimage,” and data about the captured image is called “captured image data911.” The captured image data 911 is stored into the storage 402. Thestorage 402 contains data about “reference images” stored as referenceimage data 912. Each of the reference images is an ideal image of theinspection target Wk under each illuminated state. Specifically, dataabout an ideal image corresponding to each illuminated state of theimaging part 31 is prepared in the storage 402 as the reference imagedata 912. The reference image data 912 is data about a reference imageacquired through imaging of the inspection target Wk determined to be aconforming item by the imaging part 31, for example.

The storage 402 contains threshold data 913 and result data 914 inaddition to the captured image data 911 and the reference image data912. The threshold data 913 indicates a predetermined threshold used forthe replacement determination part 404 described later to determine thenecessity to replace the shot material 211. The result data 914 is usedfor the threshold determination part 405 to determine the threshold.

The defect candidate detector 403 detects a defect candidate region in acaptured image based on the captured image and the reference image. Thereplacement determination part 404 determines the necessity to replacethe shot material 211 based on the brightness level of an inspectiontarget region in the captured image and the brightness level of areference region in the reference image corresponding to the inspectiontarget region. The replacement determination part 404 makes thedetermination based on the threshold determined by the thresholddetermination part 405. The threshold determination part 405 determinesthe threshold based on the brightness level of the inspection targetregion in the captured image in which the defect candidate region inthis captured image has been detected by the defect candidate detector403, and information about whether the defect candidate region truly hasa defect.

<Operation of Surface Treatment System>

FIG. 4 is a flowchart showing various steps performed by the surfacetreatment system 1. In the below, the functions of the defect candidatedetector 403, the replacement determination part 404 and the thresholddetermination part 405 will be described by following a flow of theoperation of the surface treatment system 1.

First, the operation of the surface treatment system 1 will be describedin outline by referring to FIG. 4. First, in the surface treatmentsystem 1, the ejector 2 treats a surface of the inspection target Wk(surface treatment step S10). Next, the inspection target Wk subjectedto the surface treatment is carried from the ejector 2 into theappearance inspection apparatus 3, and the imaging part 31 captures animage of the inspection target Wk. In this way, a captured image isprepared (image preparation step S11).

Then, the defect candidate detector 403 detects a defect candidateregion (defect candidate detection step S12), and the replacementdetermination part 404 determines the necessity to replace the shotmaterial 211 (replacement determination step S13). If the replacementdetermination part 404 determines that the shot material 211 needsreplacement, an indication showing the necessity of replacement isdisplayed on the display part 41 (display step S14). The replacementdetermination part 404 outputs the shot material replacement signalSig1. In response to receipt of the shot material replacement signalSig1, the supply controller 25 of the ejector 2 issues an operationcommand to open the on-off valve 26. By doing so, a new shot material211 is supplied from the shot material storage 24 to the shot materialsupplier 22 (replacement step S15).

The surface treatment step S10 will be described. Before being carriedinto the appearance inspection apparatus 3, the inspection target Wk issubjected to surface treatment by the ejector 2. First, the inspectiontarget Wk is carried into the chamber 20 of the ejector 2, and theinspection target Wk is held by the holder 201. Next, the shot material211 is supplied from the shot material supplier 22 to the ejection part21, and the shot material 211 is ejected from the ejection part 21toward the inspection target Wk held by the holder 201. The ejected shotmaterial 211 collides with the inspection target Wk and polishes thesurface of the inspection target Wk. By doing so, a burr is removed fromthe surface of the inspection target Wk. This places the surface in amatte state with tiny asperities, specifically, in a frosted state. Theglossiness of the surface of the inspection target Wk is preferably fromabout 20 to about 60. However, this glossiness depends on the freshnessof the shot material 211.

The shot material 211 becomes worn as the shot material 211 collideswith the inspection target Wk to shrink, compared to the shape of theshot material 211 before being ejected. After the collision, the shotmaterial 211 stays at a lower part of the chamber 20, is collected bythe shot material collector 23, and is fed to the shot material supplier22. Then, the shot material 211 is ejected again to the inspectiontarget Wk. Specifically, the shot material 211 is used repeatedly. A newshot material 211 (specifically, the shot material 211 without wearhaving an initial bead shape) is used for replenishment by being fedfrom the shot material storage 24 to the shot material supplier 22.

The glossiness of the surface of the inspection target Wk subjected tosurface treatment with the shot material 211 having become worn as aresult of repeated use after the replenishment with this shot material211 is known to be lower than the glossiness of the surface of theinspection target Wk subjected to surface treatment with the new shotmaterial 211 immediately after the replenishment with this new shotmaterial 211. The appearance of the inspection target Wk determinedthrough visual inspection also becomes darker gradually as a result ofrepeated use of the shot material 211.

Conventionally, the shot material 211 used repeatedly a predeterminednumber of times or more (or a predetermined period of time or more), theshot material 211 is discharged to the outside of the ejector 2 throughthe discharge mechanism not shown in the drawings after the shotmaterial 211 is collected by the shot material collector 23. In responseto this discharge, a new shot material 211 is supplied from the shotmaterial storage 24 to the shot material supplier 22. This replenishmentof the shot material 211 is made regularly, for example, once a day,within a range as a rough indication allowing a burr, etc. to be removedeffectively during surface treatment (within a range in which an item isdetermined to be a conforming item).

Regarding replenishment of the shot material 211 made in the ejector 2within the range allowing effective removal of a burr, etc., a problemhas not become evident as long as the inspection target Wk is inspectedvisually. However, a new problem described below arises if theinspection target Wk is to be inspected for a defect based on a capturedimage and a reference image of the inspection target Wk. The glossinessof the surface of the inspection target Wk is reduced gradually withpassage of time after replenishment of the shot material 211. Thisincreases a difference between the captured image and the referenceimage to increase the ratio of overdetection (what is called falseinformation) by which the inspection target Wk is determined to be adefective item by an inspection even if this inspection target Wk is aconforming item. Specifically, inspection accuracy is reduced as aresult of repeated use of the shot material 211.

In this regard, to reduce overdetection by the appearance inspectionapparatus 3, the inventors have come up with the idea of changing acriterion for making a determination about replacement of the shotmaterial 211 from being within the range “allowing effective removal ofa burr, etc.,” to being within a range “allowing effective reduction ofoverdetection by the appearance inspection apparatus 3.” As a result ofimplementation of the following steps from the image preparation stepS11 to the replacement determination step S13, the inventors suggest tomake a determination about the necessity to replace the shot material211 by the appearance inspection apparatus 3 as well as conducting adefect inspection by the appearance inspection apparatus 3.

FIG. 5 is a flowchart showing the image preparation step S11 in detail.After the ejector 2 performs the surface treatment on the inspectiontarget Wk in the surface treatment step S10, the image preparation stepS11 is performed. When the image preparation step S11 is started, theinspection target Wk taken out of the ejector 2 is carried into theappearance inspection apparatus 3, and held on the holder 34 (holdingstep S111). The holder 34 has an abutment for positioning, for example.A part of the inspection target Wk determined in advance and theabutment contact each other to place the inspection target Wk at apredetermined position in a predetermined direction. The holder 34 maybe a stage with a positioning pin.

Next, the imaging controller 401 issues an operation command for theimaging part 31 and the light emitters 32, 33. While changing anilluminated state by changing turning-on of the light emitters 32, 33,the imaging controller 401 makes the imaging part 31 capture an image(light emission step S112 and imaging step S113). Specifically, theimaging controller 401 performs the light emission step S112 in which aninstruction to turn on is given to the light emitters 32, 33 to turn onat least a selected one of the light emitter 32 and the light emitter33, and the imaging step S113 in which the imaging part 31 captures animage of the inspection target Wk in response to an imaging instructiongiven from the imaging controller 401 while the light emitter 32 and/orthe light emitter 33 is turned on to acquire a captured image.

More specifically, the imaging part 31 first captures an image in anindividually illuminated state in which only the light emitter 32 isturned on to acquire a captured image. Then, the light emitter 32 isturned off and the light emitter 33 is turned on. In an individuallyilluminated state in which only the light emitter 33 is turned on, theimaging part 31 captures an image to acquire a captured image. Finally,the imaging part 31 captures an image in the multiplied illuminatedstate in which both the light emitter 32 and the light emitter 33 areturned on to acquire a captured image. By doing so, the imaging part 31acquires three images. The order of changing an illuminated state is notlimited to the foregoing order but is determined freely.

Data about the captured images is stored as the captured image data 911into the storage 402 (storage step S114). As already described, in thestorage 402, the data about a reference image corresponding to eachcaptured image is prepared as the reference image data 912. Thereference image shows the inspection target Wk (this inspection targetWk is what is called a conforming item) extracted as a reference for adefect inspection under an illuminated state similar to an illuminatedstate under which the captured image has been acquired. The referenceimage data 912 may be acquired by capturing an image of the inspectiontarget Wk without a defect, or may be acquired as data about an averageimage of images of a large number of inspection targets Wk.

Specifically, the inspection target Wk as a conforming item is subjectedto the holding step S111, the light emission step S112, the imaging stepS113 and the storage step S114 in the same way as that described aboveto store data about a reference image as the reference image data 912into the storage 402.

After all the imaging steps intended by the imaging controller 401 arefinished, the defect candidate detection step S12 is preformed in whichthe defect candidate detector 403 detects a defect candidate region inthe captured image. For simplification of description given below,processing on image data will be described simply as processing on animage, where appropriate.

FIG. 6 is an example of a captured image 810 showing the surface of theinspection target Wk acquired by the imaging part 31 in the multipliedilluminated state. For the sake of description, the inspection target Wkappearing in the captured image 810 has a defect. The defect in thecaptured image 810 is a dent, for example, and is shown as a “defect813” in FIG. 6. The defect 813 in the captured image 810 is shown to bedarker than a surface without a defect. Before implementation of thedefect candidate detection step S12, the defect 813 is not recognized asa defect by the appearance inspection apparatus 3. Only after the defect813 is extracted as a “defect candidate region” described later byimplementation of the defect candidate detection step S12, the defect813 is recognized as a candidate for a defect. The following descriptionis given while attention is focused on a captured image acquired in themultiplied illuminated state. Meanwhile, the same processing is alsoperformed on a captured image acquired in an individually illuminatedstate.

A surface region of the inspection target Wk appearing in the capturedimage 810 and to become a target of a defect inspection is illustratedas a “defect inspection target region 811.” Likewise, a surface regionof the inspection target Wk appearing in the captured image 810 and tobe used for making a determination about the necessity to replace theshot material 211 is illustrated as a “replacement inspection targetregion 812.” In the captured image 810, a region designated as thereplacement inspection target region 812 has a larger area than thedefect inspection target region 811 and encompasses the defectinspection target region 811. However, the replacement inspection targetregion 812 and the defect inspection target region 811 are not limitedto the foregoing regions in terms of embodying the present invention butmay be the same region having the same area. Alternatively, thereplacement inspection target region 812 and the defect inspectiontarget region 811 may be separate regions independent of each other.

FIG. 7 is an example of a reference image 820 showing the surface of theinspection target Wk as a conforming item acquired by the imaging part31 in the multiplied illuminated state. A region appearing in thereference image 820 and corresponding to the defect inspection targetregion 811 in the captured image 810 is illustrated as a “defectreference region 821.” Likewise, a region appearing in the referenceimage 820 and corresponding to the replacement inspection target region812 in the captured image 810 is illustrated as a “replacement referenceregion 822.”

When the defect candidate detection step S12 is started, the defectcandidate detector 403 extracts the captured image data 911 and thereference image data 912 acquired in the multiplied illuminated stateand stored in the storage 402. Then, the defect candidate detector 403compares the defect inspection target region 811 in the captured image810 and the defect reference region 821 in the reference image 820. Forthis comparison, a difference or a ratio between a pixel value in thedefect inspection target region 811 and a corresponding pixel value inthe defect reference region 821 is acquired. If this difference or ratiois a predetermined value or more, a region in the defect inspectiontarget region 811 having this pixel value is extracted as a “defectcandidate region 813.” Specifically, a region having a difference of acertain degree of more between the defect inspection target region 811and the defect reference region 821 (a region brighter than or darkerthan the defect reference region 821 and in which the absolute of apixel value in the defect inspection target region 811 is larger than agiven value, for example) is extracted as the defect candidate region813.

Further, the defect candidate detector 403 calculates an average ofpixels in the replacement inspection target region 812 in the capturedimage 810 (specifically, an average of luminance values corresponding tothe brightness level of the replacement inspection target region 812),and stores the calculated average in association with the extracteddefect candidate region 813 into the storage 402 as the result data 914.

In the appearance inspection apparatus 3, whether using the differenceor the ratio as a criterion is determined based on a parameter definedin advance in the program 80, or a parameter given by a user using theinput part 42. Various predetermined values used in the defect candidatedetection by the appearance inspection apparatus 3 are determined basedon a parameter defined in advance in the program 80, or a parametergiven by a user using the input part 42.

A mode in which the defect candidate detector 403 detects the defectcandidate region 813 in the defect candidate detection step S12 is notlimited to the foregoing mode. For example, the defect candidate region813 may be extracted using a comparison technique described in JapaneseExamined Patent Publication No. 6-21769. Alternatively, the defectcandidate region 813 may be extracted by generating a compositeinspection image resulting from combining of multiple captured imagesusing the image composite technique described in Japanese PatentApplication Publication No. 2015-68668, and comparing the compositeinspection image with a reference image.

Regarding captured images acquired in other illuminated states (anindividually illuminated state using only the light emitter 32 and anindividually illuminated state using only the light emitter 33), thedefect candidate detector 403 compares each of these captured imageswith the reference image in the same manner as that described above,thereby extracting a defect candidate region.

If a defect candidate region is extracted from any of the three capturedimages acquired in the corresponding illuminated states based on acondition defined in advance in the program 80, the inspection target Wkappearing in this captured image is determined to have a defect. Aresult of the determination is stored into the storage 402, and anindication showing the presence of the defect at the inspection targetWk is displayed on the display part 41. The foregoing is not the onlyway of making the determination in terms of embodying the presentinvention. The inspection target Wk may be determined to have a defectif defect candidate regions are extracted from all of the three capturedimages acquired in the corresponding illuminated states. Alternatively,the inspection target Wk may be determined to have a defect if defectcandidate regions are extracted from two or more of the three capturedimages acquired in the corresponding illuminated states. A condition forthe defect determination is determined based on a parameter defined inadvance in the program 80, or a parameter given by a user using theinput part 42.

Referring to FIG. 4, the replacement determination part 404 thereafterperforms the replacement determination step S13 to determine thenecessity to replace the shot material 211 based on the captured image810 (see FIG. 6) and the reference image 820 (see FIG. 7).

When the replacement determination step S13 is started, the replacementdetermination part 404 extracts the captured image data 911 and thereference image data 912 acquired in the multiplied illuminated stateand stored in the storage 402. Then, the brightness level of thereplacement inspection target region 812 in the captured image 810 andthe brightness level of the replacement reference region 822 in thereference image 820 are compared. In the captured image 810 and thereference image 820, a brightness level is expressed in terms of a pixelvalue (from zero to 255). Increase in a pixel value means a higherbrightness level and a higher level of glossiness of the inspectiontarget Wk appearing in an image. A pixel value used herein is synonymouswith a luminance value or lightness.

The brightness level of the replacement inspection target region 812 isobtained by calculating the sum of the pixel values of pixels in thereplacement inspection target region 812, and dividing the sum by thenumber of the pixels in the replacement inspection target region 812.Specifically, a brightness level is acquired as an average of the pixelvalues of the pixels in the replacement inspection target region 812.The brightness level of the replacement inspection target region 812 isnot limited to an average of pixel values in terms of embodying thepresent invention. The brightness level of the replacement inspectiontarget region 812 may be a median of the pixel values of pixels in thereplacement inspection target region 812. Alternatively, the sum of thepixel values may be used as it is as the brightness level withoutobtaining an average.

The brightness level of the replacement reference region 822 is obtainedby the same way as that for obtaining the brightness level of thereplacement inspection target region 812. If the brightness level ofeach of these regions is obtained as an average or a median of pixelvalues of pixels, the number of pixels in the replacement inspectiontarget region 812 and the number of pixels in the replacement referenceregion 822 may differ from each other.

The brightness level of the replacement inspection target region 812 andthe brightness level of the replacement reference region 822 in thereference image 820 are compared by calculating the absolute of adifference between these brightness levels, and determining whether theabsolute is a predetermined threshold or more. The threshold is acquiredthrough referring to the threshold data 913 in the storage 402 by thereplacement determination part 404. If the absolute is the threshold ormore, the replacement determination part 404 determines that the shotmaterial 211 needs replacement in the ejector 2, and outputs the shotmaterial replacement signal Sig1.

A difference between brightness levels is not limited to the absolute ofa difference between the brightness level of the replacement inspectiontarget region 812 and the brightness level of the replacement referenceregion 822 in the reference image 820 in terms of embodying the presentinvention. For example, a difference between brightness levels may beobtained by calculating a ratio between these brightness levels, anddetermining whether separation of the calculated value of the ratio from“1” (a value indicating a degree of separation from 1) is a threshold ormore.

In this embodiment, the replacement determination step S13 is performedafter the defect candidate detection step S12. However, this is not theonly order in terms of embodying the present invention. For example, thereplacement determination step S13 may be performed before the defectcandidate detection step S12. Alternatively, the replacementdetermination step S13 and the defect candidate detection step S12 maybe performed in parallel.

If the replacement determination part 404 outputs the shot materialreplacement signal Sig1 after implementation of the replacementdetermination step S13 (in the case of a flow resulting from YESdetermined in the replacement determination step S13 in FIG. 4), thedisplay step S14 and the replacement step S15 are performed thereafter.If the replacement determination part 404 does not determine that theshot material 211 needs replacement in the replacement determinationstep S13 and does not output the shot material replacement signal Sig1(in the case of a flow resulting from NO determined in the replacementdetermination step S13 in FIG. 4), the display step S14 and thereplacement step S15 are not performed and the operation of the surfacetreatment system 1 is finished.

When the display step S14 is started, the display part 41 receives theshot material replacement signal Sig1 from the replacement determinationpart 404, and an indication showing the necessity to replace the shotmaterial 211 is displayed on the display part 41. An indication showingthe necessity to replace the shot material 211 may be displayed on adisplay at the display part 41. However, displaying the indication isnot the only means of notification to an operator. For example, theoperator may be notified of the indication showing the necessity toreplace the shot material 211 by means of sound.

When the replacement step S15 is started thereafter, the supplycontroller 25 of the ejector 2 issues an operation command for theon-off valve 26 to open the on-off valve 26. By doing so, a new shotmaterial 211 is supplied from the shot material storage 24 to the shotmaterial supplier 22 through the pipe 27. In this way, the shot material211 is replaced in the ejector 2.

The foregoing is not the only configuration in terms of embodying thepresent invention. For example, the configuration may be such that, ifan operator inputs an instruction to replace the shot material 211through the input part 42 after the indication showing the necessity toreplace the shot material 211 is displayed at the display part 41 in thedisplay step S14, the controller 4 transmits the shot materialreplacement signal Sig1 to the supply controller 25, and the replacementstep S15 is performed in response to this transmission as a trigger.

As a result of the foregoing, the operations in a sequence of thesurface treatment system 1 are completed. Each time the inspectiontarget Wk having an untreated surface is transferred into the ejector 2from a previous step, the surface treatment system 1 performs theseoperations in a sequence.

<Operation of Threshold Determination Part>

For implementation of the foregoing operations in a sequence, thethreshold data 913 about the threshold used in the replacementdetermination step S13 is stored in advance in the storage 402. Thefollowing describes operations of determining the threshold and storingthe threshold as the threshold data 913 into the storage 402 performedby the threshold determination part 405. These operations may beperformed regularly in the surface treatment system 1, or may beperformed based on an instruction to determine a threshold inputted tothe input part 42 from an operator.

The threshold may be determined by the threshold determination part 405.The threshold may also be determined through input of a thresholddirectly from a user to the input part 42 and storage of the inputthreshold into the storage 402 as the threshold data 913. Before thethreshold determination part 405 determines the threshold, the thresholdinput from the operator may be used. Each time the thresholddetermination part 405 determines the threshold, the threshold data 913may be overwritten and updated.

The storage 402 contains the result data 914 stored by the defectcandidate detector 403 in the defect candidate detection step S12. Theresult data 914 is data containing an average of pixels in thereplacement inspection target region 812 in the captured image 810(specifically, an average of luminance values in the replacementinspection target region 812) and the extracted defect candidate region813 associated with each other.

The operator inspects the inspection target Wk visually having beeninspected for a defect by the appearance inspection apparatus 3 anddetermined to “have a defect” (specifically, the inspection target Wkfrom which the defect candidate region 813 has been extracted), anddetermines whether this inspection target Wk truly has a defect. Then,the operator inputs a result of the determination through the input part42. This makes it possible to acquire information about whether theextracted defect candidate region 813 truly has a defect.

More specifically, the operator inputs an indication through the inputpart 42 that the designated inspection target Wk “has no defect (is aconforming item)” by checking the display part 41. This makes itpossible to acquire information indicating that the extracted defectcandidate region 813 has no defect, specifically, that a result of thedefect inspection indicating the presence of a defect at this inspectiontarget Wk is overdetection.

Then, determinations are made about a plurality of inspection targets Wkto acquire information about whether the defect candidate regions 813extracted by the operator truly have defects. By doing so, anoverdetection ratio can be acquired indicating the ratio of inspectiontargets Wk corresponding to “overdetection” relative to inspectiontargets Wk determined to “have defects.” Specifically, the overdetectionratio responsive to the brightness level of the replacement inspectiontarget region 812 can be acquired. All these results are stored as theresult data 914 into the storage 402. In this way, the result data 914becomes usable for drawing a graph shown in FIG. 8.

FIG. 8 is an example of a graph showing a relationship between theoverdetection ratio and a difference in brightness level between thereplacement inspection target region 812 and the replacement referenceregion 822. The horizontal axis shows a difference in brightness levelbetween the replacement inspection target region 812 and the replacementreference region 822. The vertical axis shows the overdetection ratio(%). The replacement reference region 822 has a constant brightnesslevel, so that a difference in brightness level between the replacementinspection target region 812 and the replacement reference region 822depends on the brightness level of the replacement inspection targetregion 812. This shows that, as long as the overdetection ratioresponsive to the brightness level of the replacement inspection targetregion 812 is known, the overdetection ratio determined at a given valueof a difference in brightness level between the replacement inspectiontarget region 812 and the replacement reference region 822 can be known,as seen from the graph in FIG. 8. FIG. 8 shows that there is a tendencyto increase the overdetection ratio in response to increase in thedifference in brightness level. This results from the followingphenomenon. As time passes after replenishment of the shot material 211,the glossiness of the surface of the inspection target Wk is reducedgradually. This reduces the brightness level of the replacementinspection target region 812 in the captured image 810 with time. Thus,a difference between the captured image 810 and the reference image 820increases gradually when the inspection target Wk is inspected for adefect based on the captured image 810 and the reference image 820 ofthe inspection target Wk. This increases the ratio of overdetection(so-called false information) caused by determining the inspectiontarget Wk to be a defective item by an inspection even if thisinspection target Wk is a conforming item.

The threshold determination part 405 draws the graph in FIG. 8 in theform of data based on the result data 914. The data is supplementedusing various types of interpolation techniques including linearinterpolation to compensate for a region without plot data. Then, basedon a threshold (Ath) for the overdetection ratio defined in advance inthe program 80 or a threshold (Ath) for the overdetection ratioinstructed from an operator using the input part 42, the thresholddetermination part 405 calculates a threshold (Bth) for a correspondingdifference in brightness level. Next, the threshold determination part405 stores the calculated threshold Bth as the threshold data 913 intothe storage 402.

As a result of the foregoing, it becomes possible to determine timing ofreplacing the shot material 211 within a range allowing prevention ofexcess of the overdetection ratio over the given threshold Ath based onwhether a difference in brightness level between the replacementinspection target region 812 and the replacement reference region 822 isthe given threshold Bth or more. This can prevent excess of theoverdetection ratio over the threshold Ath determined freely.

Specifically, in the appearance inspection apparatus 3 in the surfacetreatment system 1, the imaging part 31 captures an image of theinspection target Wk, and the replacement determination part 404determines the necessity to replace the shot material 211. If adifference in brightness level between the replacement inspection targetregion 812 in the captured image 810 and the replacement referenceregion 822 in the corresponding reference image 820 is the giventhreshold Bth or more, the replacement determination part 404 determinesthat the shot material 211 needs replacement in the ejector 2. Thismakes it possible to determine replacement of the shot material 211within a range allowing prevention of excess of the ratio ofoverdetection by the appearance inspection apparatus 3 over the giventhreshold Ath, so that the overdetection of a defect by the appearanceinspection apparatus 3 can be reduced efficiently.

As has been described above by showing the specific embodiment, in theappearance inspection apparatus of the present invention, thereplacement determination part may be configured to determine that theshot material needs replacement if a difference in brightness levelbetween the inspection target region and the reference region is apredetermined threshold or more.

Further, the appearance inspection apparatus of the present inventionmay further include a threshold determination part that determines thepredetermined threshold based on the brightness level of the inspectiontarget region in the captured image in which the defect candidate regionhas been detected by the defect candidate detector, and informationabout whether the defect candidate region truly has a defect.

In the appearance inspection apparatus of the present invention, thereplacement determination part may be configured to output a shotmaterial replacement signal if the replacement determination partdetermines that the shot material needs replacement. Further, thepresent invention may also be configured as a surface treatment systemincluding the foregoing appearance inspection apparatus, and an ejectorthat treats the surface of the inspection target with the shot material.In the surface treatment system, the ejector includes: an ejection partthat ejects the shot material to the inspection target whileaccelerating the shot material; a shot material supplier that suppliesthe ejection part with the shot material; a shot material collector thatcollects the shot material after being ejected from the ejection partand carries the collected shot material to the shot material supplier; ashot material storage that contains the shot material primarily andsupplies the shot material supplier with the shot material; and a supplycontroller that controls supply of the shot material from the shotmaterial storage to the shot material supplier. The supply controllersupplies the shot material from the shot material storage to the shotmaterial supplier in response to input of the shot material replacementsignal.

Further, the present invention may be configured as a program forcausing a computer to inspect a surface of an inspection targetsubjected to surface treatment with a shot material. Execution of theprogram by the computer causes the program to perform: a preparationstep of preparing a captured image by capturing an image of the surfaceof the inspection target and a reference image corresponding to thecaptured image; a defect candidate detection step of detecting a defectcandidate region in the captured image based on the captured image andthe reference image; and a replacement determination step of determiningthe necessity to replace the shot material based on the brightness levelof an inspection target region in the captured image and the brightnesslevel of a reference region in the reference image corresponding to theinspection target region.

The present invention may be configured as a shot material replacementdetermination method of determining the necessity to replace a shotmaterial in an ejector. The shot material replacement determinationmethod includes: a preparation step of preparing a captured image bycapturing an image of a surface of a treatment target subjected totreatment on the surface with the shot material and a reference imagecorresponding to the captured image; and a replacement determinationstep of determining the necessity to replace the shot material based onthe brightness level of an inspection target region in the capturedimage and the brightness level of a reference region in the referenceimage corresponding to the inspection target region.

Although the invention has been described with reference to specificembodiments, this description is not meant to be construed in a limitingsense. Various modifications of the disclosed embodiment, as well asother embodiments of the present invention, will become apparent topersons skilled in the art upon reference to the description of theinvention. It is therefore contemplated that the appended claims willcover any such modifications or embodiments as fall within the truescope of the invention.

REFERENCE SIGNS LIST

1 surface treatment system

2 ejector

3 appearance inspection apparatus

4 controller

8 recording medium

20 chamber

21 ejection part

22 shot material supplier

23 shot material collector

24 shot material storage

25 supply controller

26 on-off valve

27. pipe

30 body

31 imaging part

32, 33 light emitter

34 holder

41 display part

42 input part

80 program

124 fixed disk

127 reader device

128 communication part

201 holder

211 shot material

221 pipe

401 imaging controller

402 storage

403 defect candidate detector

404 replacement determination part

405 threshold determination part

810 captured image

811 defect inspection target region

812 replacement inspection target region

813 defect candidate region

820 reference image

821 defect reference region

822 replacement reference region

911 captured image data

912 reference image data

913 threshold data

914 result data

Ath threshold (for the overdetection ratio)

Bth threshold (for a difference in brightness)

S10 surface treatment step

S11 image preparation step

S12 defect candidate detection step

S13 replacement determination step

S14 display step

S15 replacement step

Sig1 shot material replacement signal

Wk inspection target, treatment target

1. An appearance inspection apparatus which inspects a surface of aninspection target subjected to surface treatment with a shot material,comprising: an imaging part which captures an image of the surface ofthe inspection target to acquire a captured image; a storage whichcontains a reference image corresponding to the captured image; a defectcandidate detector which detects a defect candidate region in thecaptured image based on the captured image and the reference image; anda replacement determination part which determines a necessity to replacethe shot material based on a brightness level of an inspection targetregion in the captured image and a brightness level of a referenceregion in the reference image corresponding to the inspection targetregion.
 2. The appearance inspection apparatus according to claim 1,wherein the replacement determination part is configured to determinethat the shot material needs replacement if a difference in brightnesslevel between the inspection target region and the reference region is apredetermined threshold or more.
 3. The appearance inspection apparatusaccording to claim 2, further comprising a threshold determination partwhich determines the predetermined threshold based on the brightnesslevel of the inspection target region in the captured image in which thedefect candidate region has been detected by the defect candidatedetector and information about whether the defect candidate region trulyhas a defect.
 4. The appearance inspection apparatus according to claim1, wherein the replacement determination part is configured to output ashot material replacement signal if the replacement determination partdetermines that the shot material needs replacement.
 5. A surfacetreatment system, comprising: the appearance inspection apparatusaccording to claim 4; and an ejector which treats the surface of theinspection target with the shot material, wherein the ejector includes:an ejection part which ejects the shot material to the inspection targetwhile accelerating the shot material; a shot material supplier whichsupplies the ejection part with the shot material; a shot materialcollector which collects the shot material after being ejected from theejection part and carries the shot material which is collected to theshot material supplier; a shot material storage which contains the shotmaterial primarily and supplies the shot material supplier with the shotmaterial; and a supply controller which controls supply of the shotmaterial from the shot material storage to the shot material supplier,and the supply controller supplies the shot material from the shotmaterial storage to the shot material supplier in response to input ofthe shot material replacement signal.
 6. An appearance inspection methodof inspecting a surface of an inspection target subjected to surfacetreatment with a shot material, comprising: a preparation step ofpreparing a captured image by capturing an image of the surface of theinspection target and a reference image corresponding to the capturedimage; a defect candidate detection step of detecting a defect candidateregion in the captured image based on the captured image and thereference image; and a replacement determination step of determining anecessity to replace the shot material based on a brightness level of aninspection target region in the captured image and a brightness level ofa reference region in the reference image corresponding to theinspection target region.
 7. (canceled)
 8. A shot material replacementdetermination method of determining the necessity to replace a shotmaterial in an ejector, comprising: a preparation step of preparing acaptured image by capturing an image of a surface of a treatment targetsubjected to treatment on the surface with the shot material and areference image corresponding to the captured image; and a replacementdetermination step of determining a necessity to replace the shotmaterial based on a brightness level of an inspection target region inthe captured image and a brightness level of a reference region in thereference image corresponding to the inspection target region.